﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 多态
{
    class Calculate
    {
        protected int a;
        protected int b;



        public Calculate(int a,int b)
        {
            this.a = a;
            this.b = b;
        }


        public  int A { get => a; set => a = value; }
        public int B { get => b; set => b = value; }

        //虚方法
        public virtual void DisplayResult()
        {

        }
    }
}
